package com.suray.wcs.service.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

public enum TaskReceiveResultEnum {
    DISTRICT_NOT_EXIST(1, "当前库区不存在:"),
    WCS_NOT_ACCEPT(2, "当前WCS处于单机模式，不接收上位系统下发的任务，请与实施人员联系确认"),
    TASK_ID_IS_NULL(3, "存在任务Id为空的任务"),
    TASK_ID_EXIST(4, "任务已存在, TaskId:"),
    TASK_TYPE_EXCEPTION(5, "任务类型异常, TaskId:"),
    TASK_NO_START(6, "startNode为必填字段"),
    TASK_NO_END(7, "endNode为必填字段"),
    NO_IN_PORT(8, "不存在的入库口, TaskId:"),
    NO_OUT_PORT(9, "不存在的出库口, TaskId:"),
    TASK_START_NOT_EXIST(12, "任务起点无法找到, TaskId:"),
    TASK_END_NOT_EXIST(13, "任务终点无法找到, TaskId:"),
    TASK_TRANSFER_START_NO_GOODS(14, "移库任务，起点无货, TaskId:"),
    TASK_TRANSFER_END_HAS_GOODS(15, "移库任务，终点有货, TaskId:"),
    TASK_IN_END_HAS_GOODS(16, "入库任务，终点有货, TaskId:"),
    TASK_OUT_START_NO_GOODS(17, "出库任务，起点无货, TaskId:"),
    TASK_START_HAS_ERROR(18, "无法找到WCS对应的任务的起点或者入库口到达目的货位的路径不通, TaskId:"),
    TASK_END_HAS_ERROR(19, "无法找到WCS对应的任务的终点或者起点到出库口路径不通, TaskId:"),
    ;


    @EnumValue
    private int returnStatus;
    @JsonValue
    private String description;

    TaskReceiveResultEnum(int returnStatus, String description) {
        this.returnStatus = returnStatus;
        this.description = description;
    }

    public int getReturnStatus() {
        return returnStatus;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return description;
    }
}
